<template>
    <div>
        <h2>计数器：{{ count }},{{ computeCount }}</h2>
        <el-button type="primary" @click="handleIncrement">++</el-button>
    </div>
</template>
<script>
import { mapState,mapGetters,mapMutations,mapActions } from 'vuex';
export default {
    computed: {
        ...mapState(['count']),
        ...mapGetters(['computeCount'])
    },  
    methods:{
        handleIncrement(){
            // this.increment(5);
            this.delayIncrement(10);
        },
        ...mapMutations(['increment']),
        ...mapActions(['delayIncrement'])
    }
}
</script>